export let formConf = {
    formRef: 'elForm',
    formModel: 'formData',
    size: 'small',
    labelPosition: 'right',
    labelWidth: 110,
    formRules: 'rules',
    gutter: 15,
    span: 24,
    formBtns: true
}
export const inputComponents = [{
    label: '单行输入框',
    tag: 'el-input',
    tagIcon: 'input',
    placeholder: '请输入',
    defaultValue: ``,
    span: 24,
    labelWidth: 110,
    style: {width: '100%'},
    clearable: true,
    prepend: '',
    append: '',
    'prefix-icon': '',
    'suffix-icon': '', // maxlength: null,
    'show-word-limit': false,
    readonly: false,
    required: false,
    regList: [],
    changeTag: true,
    proCondition: false,
    asSummary: false,
    componentType: '基础组件'
}, {
    label: '多行输入框',
    tag: 'el-input',
    tagIcon: 'textarea',
    type: 'textarea',
    placeholder: '请输入',
    defaultValue: ``,
    span: 24,
    labelWidth: 110,
    autosize: JSON.stringify({
        minRows: 4, maxRows: 20
    }),
    style: {width: '100%'}, // maxlength: null,
    'show-word-limit': false,
    readonly: false,
    required: false,
    regList: [],
    changeTag: true,
    proCondition: false,
    asSummary: false,
    componentType: '基础组件'
}, {
    label: '数字输入框',
    tag: 'el-input-number',
    tagIcon: 'number',
    placeholder: '请输入',
    defaultValue: ``,
    style: {width: null},
    span: 24,
    labelWidth: 110,
    min: undefined,
    max: undefined,
    step: undefined,
    'step-strictly': false,
    precision: 0,//精度
    'controls-position': 'right',
    required: false,
    regList: [],
    changeTag: true,
    proCondition: true,
    componentType: '基础组件'
}, {
    label: '金额',
    tag: 'fc-amount',
    tagIcon: 'amount',
    placeholder: '请输入',
    defaultValue: ``,
    style: {width: null},
    span: 24,
    labelWidth: 110,
    min: 0,
    max: undefined,
    step: undefined,
    'step-strictly': false,
    precision: 2,//精度
    'controls-position': 'right',
    required: false,
    regList: [],
    changeTag: true,
    proCondition: true,
    showChinese: true,
    componentType: '基础组件',
}]
export const selectComponents = [{
    label: '下拉选择',
    tag: 'el-select',
    tagIcon: 'select',
    placeholder: '请选择',
    style: {width: '100%'},
    defaultValue: [{
        label: '选项一', value: '1'
    }],
    span: 24,
    labelWidth: 110,
    clearable: true,
    required: false,
    filterable: true,
    multiple: false,
    api: '',
    options: [{
        label: '选项一', value: '1'
    }, {
        label: '选项二', value: '2'
    }],
    regList: [],
    changeTag: true,
    proCondition: true,
    componentType: '基础组件'
}, {
    label: '单选框组',
    tag: 'el-radio-group',
    tagIcon: 'radio',
    defaultValue: [{
        label: '选项一', value: '1'
    }],
    api: '',
    span: 24,
    labelWidth: 110,
    style: {},
    optionType: 'default',
    border: false,
    size: '',
    required: false,
    options: [{
        label: '选项一', value: '1'
    }, {
        label: '选项二', value: '2'
    }],
    regList: [],
    changeTag: true,
    proCondition: true,
    componentType: '基础组件'
}, {
    label: '多选框组',
    tag: 'el-checkbox-group',
    tagIcon: 'checkbox',
    defaultValue: [{
        label: '选项一', value: '1'
    }, {
        label: '选项二', value: '2'
    },],
    api: '',
    span: 24,
    labelWidth: 110,
    style: {},
    optionType: 'default',
    border: false,
    size: '',
    required: false,
    options: [{
        label: '选项一', value: '1'
    }, {
        label: '选项二', value: '2'
    }],
    regList: [],
    changeTag: true,
    proCondition: true,
    componentType: '基础组件'
}, {
    label: '实际申请人',
    defaultValue: undefined,
    tag: 'fc-liable-user-select',
    tagIcon: 'user',
    buttonType: 'input',
    title: '实际申请人',
    searchable: true, // maxNum: 1,
    tagConfig: {
        type: 'info',
        closable: true,
        'disable-transitions': false,
        hit: false,
        color: undefined,
        size: 'small',
        effect: 'light'
    },
    style: {width: '100%'},
    span: 24,
    labelWidth: 110,
    required: true,
    regList: [],
    changeTag: true,
    proCondition: true,
    asSummary: false,
    componentType: '增加组件'
}, {
    label: '人员',
    defaultValue: undefined,
    tag: 'fc-user-select',
    tagIcon: 'user',
    buttonType: 'input',
    multiple: false,
    title: '人员',
    searchable: true, // maxNum: 1,
    tagConfig: {
        type: 'info',
        closable: true,
        'disable-transitions': false,
        hit: false,
        color: undefined,
        size: 'small',
        effect: 'light'
    },
    style: {width: '100%'},
    span: 24,
    labelWidth: 110,
    required: false,
    regList: [],
    changeTag: true,
    proCondition: true,
    asSummary: false,
    componentType: '增加组件'
}, {
    label: '部门',
    defaultValue: undefined,
    tag: 'fc-dept-select',
    tagIcon: 'subordinate',
    buttonType: 'input',
    multiple: false,
    title: '部门',
    searchable: true, // maxNum: 1,
    tagConfig: {
        type: 'info',
        closable: true,
        'disable-transitions': false,
        hit: false,
        color: undefined,
        size: 'small',
        effect: 'light'
    },
    style: {width: '100%'},
    span: 24,
    labelWidth: 110,
    required: false,
    regList: [],
    changeTag: true,
    proCondition: true,
    asSummary: false,
    componentType: '增加组件'
}, {
    label: '岗位/角色',
    defaultValue: undefined,
    tag: 'fc-role-select',
    tagIcon: 'subordinate',
    buttonType: 'input',
    multiple: false,
    title: '岗位/角色',
    searchable: true, // maxNum: 1,
    tagConfig: {
        type: 'info',
        closable: true,
        'disable-transitions': false,
        hit: false,
        color: undefined,
        size: 'small',
        effect: 'light'
    },
    style: {width: '100%'},
    span: 24,
    labelWidth: 110,
    required: false,
    regList: [],
    changeTag: true,
    proCondition: true,
    asSummary: false,
    componentType: '增加组件'
}, {
    label: '目标部门',
    tag: 'fc-target-dept-select',
    defaultValue: undefined,
    tagIcon: 'subordinate',
    buttonType: 'input',
    title: '目标部门',
    multiple: false,
    searchable: true, // maxNum: 1,
    tagConfig: {
        type: 'info',
        closable: true,
        'disable-transitions': false,
        hit: false,
        color: undefined,
        size: 'small',
        effect: 'light'
    },
    style: {width: '100%'},
    span: 24,
    labelWidth: 110,
    required: false,
    regList: [],
    changeTag: true,
    proCondition: true,
    asSummary: false,
    componentType: '增加组件'
}, {
    label: '时间',
    defaultValue: undefined,
    tag: 'el-time-picker',
    tagIcon: 'time',
    placeholder: '请选择',
    span: 24,
    labelWidth: 110,
    style: {width: '100%'},
    clearable: true,
    required: false,
    'picker-options': {
        selectableRange: '00:00:00-23:59:59'
    },
    format: 'HH:mm:ss',
    'value-format': 'HH:mm:ss',
    regList: [],
    changeTag: true,
    proCondition: true,
    asSummary: false,
    componentType: '基础组件'
}, {
    label: '日期',
    defaultValue: undefined,
    tag: 'el-date-picker',
    tagIcon: 'date',
    placeholder: '请选择',
    type: 'date',
    span: 24,
    labelWidth: 110,
    style: {width: '100%'},
    clearable: true,
    required: false,
    format: 'YYYY-MM-DD',
    'value-format': 'YYYY-MM-DD',
    readonly: false,
    regList: [],
    changeTag: true,
    proCondition: true,
    asSummary: false,
    componentType: '基础组件'
}, {
    label: '附件',
    tag: 'el-upload',
    tagIcon: 'upload',
    action: '',
    defaultValue: [],
    labelWidth: 110,
    required: false,
    accept: '',
    name: 'file',
    'auto-upload': true,
    showTip: false,
    buttonText: '',
    fileSize: 120,
    sizeUnit: 'MB',
    'list-type': 'text',
    multiple: false,
    regList: [],
    changeTag: true,
    proCondition: false,
    asSummary: false,
    componentType: '基础组件'
}]
// 容器组件
export const layoutComponents = [{
    layout: 'rowFormItem',
    rowType: 'layout',
    tagIcon: 'row',
    type: 'default',
    justify: 'start',
    align: 'top',
    label: '布局容器',
    layoutTree: true,
    children: [],
    showDivider: false,
    componentType: '布局组件'
}, {
    layout: 'rowFormItem',
    rowType: 'table',
    tagIcon: 'table',
    tag: 'fc-input-table',
    type: 'table', // list
    justify: 'start',
    align: 'top',
    label: '表格/明细',
    layoutTree: false,
    children: [],
    actionText: '添加',
    tableConf: {},
    'show-summary': true,
    showAdd: true,
    showDelete: true,
    componentType: '布局组件'
}]
export const CommonComponents = [...inputComponents, ...selectComponents, ...layoutComponents].reduce((p, c) => {
    if (!p[c.componentType]) {
        p[c.componentType] = []
    }
    p[c.componentType].push(c)
    return p
}, {})





